using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraRotater : MonoBehaviour
{
    private Vector3 initPosition;
    public float rotScale = 0.5f;
    public float rotSpeed = 10.0f;

    void Start()
    {
        initPosition = transform.position;
    }

    void Update()
    {
        float _rotTime = Time.time * rotSpeed;
        float _XOffset = Mathf.Cos(_rotTime);
        float _ZOffset = Mathf.Sin(_rotTime);
        Vector3 _RotOffset = new Vector3(_XOffset, 0, _ZOffset);
        transform.position = initPosition + _RotOffset * rotScale;
    }
}
